<?php 

require("admin-header.php");
require("../functionbase.php");
if (!isset($_SESSION['user_rights'])){
	redirect("admin.php");
}

if (!isset($_GET['id'])) redirect("admin.php");
$user_id = $_GET['id'];
$sql='update users set rights = if(rights="B1","B","B1") where user_id ="'.$user_id.'" and reference="'.$_SESSION['user_id'].'"';
//echo $sql;
$result = mysql_query($sql);
redirect("admin.php");
require("../oj-footer.php");
?>
